<?php
class LoginHelper
{
	public function login($arg = null)
	{
		if($arg == "addtocart")
		{
			$action = "addtocart";
		} else {
			$action = "";
		}
?>
	<?php
		if(!isset($_SESSION['user_id']))
		{
	?>	
		<div id="msg_box" style="display: none;"></div>
		<form name="frmLogin" id="frmLogin" method="POST" action="index.php<?php echo "?" . $action; ?>">
			<table border="0" cellpadding="4" cellspacing="4" width="500" style="line-height: 25px;">
				<tr>
					<td width="60" align="left">Username</td>
					<td width="120"><input type="text" name="txtUsername" id="txtUsername" value="" style="width: 250px;" /></td>
				</tr>
				<tr>
					<td align="left">Password</td>
					<td><input type="password" name="txtPassword" id="txtPassword" value="" style="width: 250px;" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td style="font-size: 11px;"><a href="javascript: void(0);" onclick="forgetPassword();">forgot password</a></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td align="left"><a href="javascript: void(0);" onclick="validateUser('<?php echo $returnurl; ?>')"><img src="images/login_button.gif" border="0" /></a></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>Not a member? <a href="javascript: void(0);" onclick="loadPage('newusr', '');">Register</a> now</td>
				</tr>								
			</table>
		</form>
							
	<?php
		}			
	}
}
?>